SaveAs Macro in Excel 2007 for DOORS 9.2

I have a macro that uses the SaveAs functino in Excel to save a created Excel document. I think I've nailed down the error to Microsoft haveing to change the SaveAs Method so that you need to specify the file extension. Do I need to add any arguments into the SaveAs Macro call in DOORS?

As a note, the code worked in Excel 2003, but is not longer working in Excel 2007.
 

clear( args )
put( args, "FileName", filename )
 
checkResult( oleMethod( objWorkbook, "SaveAs", args ) )

cengler - Thu Jun 09 09:45:30 EDT 2011

Re: SaveAs Macro in Excel 2007 for DOORS 9.2
cengler - Thu Jun 09 18:12:39 EDT 2011

I put this into my code before the call to saveas happens.
 

put( args, "FileFormat", "56" )

 


File Format is a parameter for SaveAs that seems to be required because Office 2007 offers a new file type.

http://blogs.office.com/b/microsoft-excel/archive/2009/07/07/use-the-vba-saveas-method-in-excel-2007.aspx

The link is to explain and some cod ethat helped me out.

Hope this helps, and I'll post any updates as I get them.

 

Re: SaveAs Macro in Excel 2007 for DOORS 9.2
cengler - Thu Jun 09 18:12:41 EDT 2011

I put this into my code before the call to saveas happens.
 

put( args, "FileFormat", "56" )

 


File Format is a parameter for SaveAs that seems to be required because Office 2007 offers a new file type.

http://blogs.office.com/b/microsoft-excel/archive/2009/07/07/use-the-vba-saveas-method-in-excel-2007.aspx

The link is to explain and some cod ethat helped me out.

Hope this helps, and I'll post any updates as I get them.

 

Re: SaveAs Macro in Excel 2007 for DOORS 9.2
cengler - Mon Jun 13 10:00:40 EDT 2011

cengler - Thu Jun 09 18:12:41 EDT 2011

I put this into my code before the call to saveas happens.
 

put( args, "FileFormat", "56" )

 


File Format is a parameter for SaveAs that seems to be required because Office 2007 offers a new file type.

http://blogs.office.com/b/microsoft-excel/archive/2009/07/07/use-the-vba-saveas-method-in-excel-2007.aspx

The link is to explain and some cod ethat helped me out.

Hope this helps, and I'll post any updates as I get them.

 

It seems to be working. It's not very verbose, but that article link in the previous post has more file extension numbers so you guys can make your SaveAs functions a little more flexible.

Good Luck Guys.